//
//  main.m
//  Protocol协议应用场景1-类型限定
//
//  Created by wenjim on 17/10/20.
//  Copyright © 2017年 WenJim. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Person.h"
#import "Wife.h"
#import "WifeCondition.h"

int main(int argc, const char * argv[]) {
    
    Person * p = [[Person alloc] init];
    
    // 1. 协议的第一个应用场景，可以将协议写在数据类型的右边，明确标注如果想给该变量赋值，那么该对象必须遵守某个协议
//    Wife<WifeCondition> * w = [[Wife alloc] init];
    Wife * w = [[Wife alloc] init];
    p.wife = w;
    
    [p show];
    
    return 0;
}
